package dao;

import entity.Admin;

public class AdminDao {
    //假设我们从数据库查询到了用户名和密码
    String dbUsername="admin";
    String dbPassword="123456";
    public boolean selectUser(String username,String password){
        Admin admin = new Admin();
        // 判断用户名和密码是否正确
        //java中比较用equals方法
        if(username.equals(dbUsername) && password.equals(dbPassword)){
            //用户密码匹配成功
            return true;
        }
        return false;
    }
}
